<?php

namespace App\Validator\Auth\Admin;

use App\Validator\BaseValidator;

class LoginValidator extends BaseValidator
{

    protected array $attr = [
        'account' => '登录账号',
        'login_pwd' => '登录密码',
        'refresh_token' => '刷新令牌',
    ];

    public function pwdLogin($data)
    {
        return $this->validate($data,[
            'account' => ['required','string',],
            'login_pwd' => ['required','string',],
        ]);
    }

    public function refreshToken($data)
    {
        return $this->validate($data,[
            'refresh_token' => ['required','string',],
        ]);
    }
}